package com.zdy.im.user.controller;


import com.sixeco.framework.common.api.ApiDoc;
import com.sixeco.framework.http.handler.OutputResponse;
import com.zdy.im.user.UrlCommand;
import com.zdy.im.user.facade.InitFacade;
import com.zdy.im.user.vo.request.ImUserGroupQueryRequestVo;
import com.zdy.im.user.vo.response.InitShowResponseVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @Title: UserInfoController.java
 * @Author 作者 : zdy
 * @CreateDate 创建时间: 2021-02-30
 * @version V1.0
 *  <pre>
 * 修改记录
 *    修改后版本:     修改人：  修改日期:     修改内容:
 * </pre>
 * @Description: TODO(说明) 对象缓存统一模板实现类;
 */
@ApiDoc(
        module = "初始化模块", isApp = true
)
@Controller
public class InitController {

    @Autowired
    private InitFacade initFacade;

    /**
     * 用户信息初始化
     *
     */
    @ApiDoc(
            value = "初始化菜单（无好友分组）",
            request = ImUserGroupQueryRequestVo.class,
            response = InitShowResponseVo.class
    )
    @RequestMapping(value = UrlCommand.user_userInfo_init,method = RequestMethod.POST)
    public void init(OutputResponse out, ImUserGroupQueryRequestVo userRequestVo) {

        InitShowResponseVo vo = initFacade.init(userRequestVo.getUserId());
        out.write(vo);
    }

    /**
     * 用户信息初始化
     *
     */
    /*@ApiDoc(
            value = "客服初始化，返回token ,用户信息",
            request = boolean.class,
            response = InitTokenResponseVo.class
    )
    @RequestMapping(value = "/cus/oauth/token", method = RequestMethod.POST)
    public void customerInit(OutputResponse out, Principal principal) {
        InitTokenResponseVo vo = initFacade.customerInit(principal);
        out.write(vo);
    }*/

}
